import request from '../utils/request'

// 上传图片
export function addPayment(file){
    return request.post(`/payment`,file,{"Content-Type":" multipart/form-data"});
}

//查找所有的支付方式
export function getPayment(){
    return request.get(`/payment`);
}

//是否启用该支付方式
export function enablePayment(id,data){
    return request.post(`/payment/${id}`,data);
}

//是否启用该支付方式
export function deletePayment(id){
    return request.delete(`/payment/${id}`);
}

//编辑支付方式
export function editPayment(id,file){
    return request.put(`/payment/${id}`,file,{"Content-Type":" multipart/form-data"});
}
